{% load static %}
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="{% static 'plugins/bootstrap-3.4.1/css/bootstrap.min.css' %}">
    <link rel="stylesheet" href="{% static 'plugins/font-awesome-4.7.0/css/font-awesome.min.css' %}">
    <style>
        h1 {
            color: red;
            text-align: center;
        }
    </style>
</head>
<body>
<h1>hello world</h1>
{% if username %}
    <p>你好{{ username }}</p>
{% endif %}
    <a href="/Logins/" style="text-decoration: none">点击跳转登录</a>
<div>
    <button type="submit" class="btn btn-danger"><a href="/logout/">退出登录</a></button>
</div>
<form action="" ,method="get">
    <div>
        <div class="input-group" style='width: 200px;height:auto'>
            <input type="text" name='keyword' class="form-control" placeholder="Search for..." value={{ value }}>
            <span class="input-group-btn">
                  <button class="btn btn-default" type="submit">
                    <span class="glyphicon glyphicon-search" aria-hidden="true"></span>
                  </button>
                </span>
        </div>
    </div>
</form>
<table>
    <thead>
    <tr>
        <th>Name</th>
        <th> ID</th>
        <th> Price</th>
        <th> Img</th>
        <th>numbers</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        {% for good in result1 %}
            <th>
                <a href="/goods/?gid={{ good.id }}&uid={{ uid }}" style="text-decoration: none">{{ good.food }}</a>
            </th>
            <th>{{ good.id }}</th>
            <th>{{ good.price }}</th>
            <th><img src="{{ good.img }}" alt="" style="width: auto;height: auto"></th>
            <th>
                {{ good.numbers }}</th>
            </tr>
        {% endfor %}
    </tbody>
</table>
<nav aria-label="Page navigation">
    <ul class="pagination">
        <li>
            <a href="#" aria-label="Previous">
                <span aria-hidden="true">&laquo;</span>
            </a>
        </li>
        {% for foo in pagelist %}
            <li><a href="?page={{ foo }}&uid={{ uid }}&username={{ username }}">{{ foo }}</a></li>
        {% endfor %}
        <li>
            <a href="#" aria-label="Next">
                <span aria-hidden="true">&raquo;</span>
            </a>
        </li>
    </ul>
</nav>

<div>
    <a href="/Cars/?&username={{ username }}"><input type="button" value="我的购物车"></a>
</div>
<script src="{% static 'js/jquery-3.6.0.min.js' %}"></script>
<script src="{% static 'plugins/bootstrap-3.4.1/js/bootstrap.min.js' %}"></script>
</body>
</html>